Optimal. Leaf size=69 \[ \frac {1}{2} x (2 a B+2 A b+b C)+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {(a C+b B) \sin (c+d x)}{d}+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {3033, 3023, 2735, 3770} \[ \frac {1}{2} x (2 a B+2 A b+b C)+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {(a C+b B) \sin (c+d x)}{d}+\frac {b C \sin (c+d x) \cos (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 3023
Rule 3033
Rule 3770
Rubi steps
\begin {align*} \int (a+b \cos (c+d x)) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\frac {b C \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} \int \left (2 a A+(2 A b+2 a B+b C) \cos (c+d x)+2 (b B+a C) \cos ^2(c+d x)\right ) \sec (c+d x) \, dx\\ &=\frac {(b B+a C) \sin (c+d x)}{d}+\frac {b C \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} \int (2 a A+(2 A b+2 a B+b C) \cos (c+d x)) \sec (c+d x) \, dx\\ &=\frac {1}{2} (2 A b+2 a B+b C) x+\frac {(b B+a C) \sin (c+d x)}{d}+\frac {b C \cos (c+d x) \sin (c+d x)}{2 d}+(a A) \int \sec (c+d x) \, dx\\ &=\frac {1}{2} (2 A b+2 a B+b C) x+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {(b B+a C) \sin (c+d x)}{d}+\frac {b C \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 68, normalized size = 0.99 \[ \frac {4 a A \tanh ^{-1}(\sin (c+d x))+4 (a C+b B) \sin (c+d x)+4 a B d x+4 A b d x+b C \sin (2 (c+d x))+2 b c C+2 b C d x}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 73, normalized size = 1.06 \[ \frac {{\left (2 \, B a + {\left (2 \, A + C\right )} b\right )} d x + A a \log \left (\sin \left (d x + c\right ) + 1\right ) - A a \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (C b \cos \left (d x + c\right ) + 2 \, C a + 2 \, B b\right )} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 159, normalized size = 2.30 \[ \frac {2 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (2 \, B a + 2 \, A b + C b\right )} {\left (d x + c\right )} + \frac {2 \, {\left (2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 100, normalized size = 1.45 \[ \frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+a B x +\frac {B a c}{d}+\frac {a C \sin \left (d x +c \right )}{d}+A x b +\frac {A b c}{d}+\frac {b B \sin \left (d x +c \right )}{d}+\frac {b C \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}+\frac {b C x}{2}+\frac {C b c}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 82, normalized size = 1.19 \[ \frac {4 \, {\left (d x + c\right )} B a + 4 \, {\left (d x + c\right )} A b + {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C b + 4 \, A a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 4 \, C a \sin \left (d x + c\right ) + 4 \, B b \sin \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.07, size = 156, normalized size = 2.26 \[ \frac {B\,b\,\sin \left (c+d\,x\right )}{d}+\frac {C\,a\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \cos {\left (c + d x \right )}\right ) \left (A + B \cos {\left (c + d x \right )} + C \cos ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________